using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Medianamik.Core;
using Medianamik.Core.Sugar;
using Roles = Medianamik.Core.Security.Roles;
using Medianamik.Core.Security;
using System.Globalization;
using Medianamik.Globalization;
using Medianamik.Core.Interfaces;
using System.Text;

namespace Medianamik.UI.Web.ModalWindows
{
    public partial class PropertyPreviewWindow : BasePage
    {
        private string _url;

        protected void Page_Load(object sender, EventArgs e)
        {
            _url = Request.QueryString["url"];

            if(String.IsNullOrEmpty(_url))
            {
                DisplayMessage(String.Concat(
                     (string)GetGlobalResourceObject("Medianamik_Global", "ArgumentNullException"), " ",
                     "url"));
            }
        }

        #region Properties

        protected string Url { get
            { return Page.Server.UrlDecode(_url); }
        }

        #endregion

        #region Methods

        private void DisplayMessage(string message)
        {
            scriptBlock.Visible = false;
            MainPlaceHolder.Visible = false;
            MessagePlaceHolder.Visible = true;
            Message.Text = message;
        }

        #endregion
    }
}
